package org.catspaw.cherubim.persistence.hibernate;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;

public class DefaultSessionManagerImplementor implements SessionManagerImplementor {

	public void closeCurrentSession() throws HibernateException {
		HibernateSessionFactoryUtils.closeCurrentSession();
	}

	public Session getCurrentSession() throws HibernateException {
		return HibernateSessionFactoryUtils.getCurrentSession();
	}

	public Session getSession(boolean allowCreate) throws HibernateException {
		return HibernateSessionFactoryUtils.getSession(allowCreate);
	}

	public Session getSession() throws HibernateException {
		return HibernateSessionFactoryUtils.getSession();
	}

	public SessionFactory getSessionFactory() {
		return HibernateSessionFactoryUtils.getSessionFactory();
	}

	public Session openSession() throws HibernateException {
		return HibernateSessionFactoryUtils.openSession();
	}
}
